home *** CD-ROM | disk | FTP | other *** search
- /*4:*/
- #line 59 "FrontPubScreen.w"
-
- char version[]= "\0$VER: FrontPubScreen 1.0 (4.12.92)";
-
- /*:4*//*5:*/
- #line 69 "FrontPubScreen.w"
-
- /*6:*/
- #line 93 "FrontPubScreen.w"
-
- #include <exec/types.h>
- #include <intuition/intuition.h>
- #include <intuition/intuitionbase.h>
- #include <dos/dos.h>
-
- /*:6*/
- #line 70 "FrontPubScreen.w"
-
-
- /*7:*/
- #line 104 "FrontPubScreen.w"
-
-
- #include <proto/intuition.h>
- #include <proto/dos.h>
- #include <proto/exec.h>
-
-
- /*:7*/
- #line 72 "FrontPubScreen.w"
-
-
- /*8:*/
- #line 119 "FrontPubScreen.w"
-
-
- struct IntuitionBase*IntuitionBase;
- char public_screen_name[MAXPUBSCREENNAME];
- struct Screen*public_screen_address;
-
- /*:8*//*12:*/
- #line 174 "FrontPubScreen.w"
-
-
- ULONG intuition_lock;
- struct Screen*front_screen_address;
- struct List*public_screen_list;
- struct PubScreenNode*public_screen_node;
-
- /*:12*/
- #line 74 "FrontPubScreen.w"
-
-
- main(argc,argv)
- int argc;
- char*argv[];
- {
- if(argc){
- /*9:*/
- #line 134 "FrontPubScreen.w"
-
-
- IntuitionBase= (struct IntuitionBase*)OpenLibrary("intuition.library",36L);
- if(!IntuitionBase){
- exit(20L);
- }
-
- /*:9*/
- #line 81 "FrontPubScreen.w"
- ;
- /*13:*/
- #line 197 "FrontPubScreen.w"
-
-
- public_screen_name[0]= '\0';
-
- intuition_lock= LockIBase(0L);
- front_screen_address= IntuitionBase->FirstScreen;
- if((front_screen_address->Flags&PUBLICSCREEN)||(front_screen_address->Flags&WBENCHSCREEN)){
- UnlockIBase(intuition_lock);
- /*14:*/
- #line 224 "FrontPubScreen.w"
-
-
- public_screen_list= LockPubScreenList();
- public_screen_node= (struct PubScreenNode*)public_screen_list->lh_Head;
- while(public_screen_node){
- if(public_screen_node->psn_Screen==front_screen_address){
- strcpy(public_screen_name,public_screen_node->psn_Node.ln_Name);
- break;
- }
- public_screen_node= (struct PubScreenNode*)public_screen_node->psn_Node.ln_Succ;
- }
- UnlockPubScreenList();
-
- /*:14*/
- #line 205 "FrontPubScreen.w"
- ;
- }
- else{
- UnlockIBase(intuition_lock);
- }
-
- if(public_screen_name[0]=='\0'){
- GetDefaultPubScreen(public_screen_name);
- }
-
-
- /*:13*/
- #line 82 "FrontPubScreen.w"
- ;
- /*11:*/
- #line 158 "FrontPubScreen.w"
-
-
- public_screen_address= LockPubScreen(public_screen_name);
- if(public_screen_address){
- (void)PutStr(public_screen_name);
- (void)PutStr("\n");
- UnlockPubScreen(NULL,public_screen_address);
- }
- else{
- (void)PutStr("Workbench\n");
- }
-
- /*:11*/
- #line 83 "FrontPubScreen.w"
- ;
- /*10:*/
- #line 146 "FrontPubScreen.w"
-
-
- CloseLibrary((struct Library*)IntuitionBase);
-
- /*:10*/
- #line 84 "FrontPubScreen.w"
-
- }
- }
-
- /*:5*/
-